package p3;

import java.util.Scanner;

/**
 * @author krystal
 * @date 2022/11/9 20:49
 */
public class Demo15 {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        int num = sca.nextInt();//输入整数

        System.out.println("奇数位为：");//输出奇数位
        for (int i = 29; i >= 1; i -= 2){
            System.out.print(num>>i&1); //右移，然后与1得到该位的值
        }
        System.out.println();//换行
        System.out.println("偶数位为：");//输出偶数位
        for (int i = 28; i >= 0; i -= 2){
            System.out.print(num>>i&1);//同奇数位
        }

    }
}
